3.567 \(\int \frac{\sec ^6(c+d x)}{(a+b \tan (c+d x))^3} \, dx\)

Optimal. Leaf size=121 \[ -\frac{\left (a^2+b^2\right )^2}{2 b^5 d (a+b \tan (c+d x))^2}+\frac{4 a \left (a^2+b^2\right )}{b^5 d (a+b \tan (c+d x))}+\frac{2 \left (3 a^2+b^2\right ) \log (a+b \tan (c+d x))}{b^5 d}-\frac{3 a \tan (c+d x)}{b^4 d}+\frac{\tan ^2(c+d x)}{2 b^3 d} \]

[Out]

(2*(3*a^2 + b^2)*Log[a + b*Tan[c + d*x]])/(b^5*d) - (3*a*Tan[c + d*x])/(b^4*d) + Tan[c + d*x]^2/(2*b^3*d) - (a
^2 + b^2)^2/(2*b^5*d*(a + b*Tan[c + d*x])^2) + (4*a*(a^2 + b^2))/(b^5*d*(a + b*Tan[c + d*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.101935, antiderivative size = 121, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {3506, 697} \[ -\frac{\left (a^2+b^2\right )^2}{2 b^5 d (a+b \tan (c+d x))^2}+\frac{4 a \left (a^2+b^2\right )}{b^5 d (a+b \tan (c+d x))}+\frac{2 \left (3 a^2+b^2\right ) \log (a+b \tan (c+d x))}{b^5 d}-\frac{3 a \tan (c+d x)}{b^4 d}+\frac{\tan ^2(c+d x)}{2 b^3 d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^6/(a + b*Tan[c + d*x])^3,x]

[Out]

(2*(3*a^2 + b^2)*Log[a + b*Tan[c + d*x]])/(b^5*d) - (3*a*Tan[c + d*x])/(b^4*d) + Tan[c + d*x]^2/(2*b^3*d) - (a
^2 + b^2)^2/(2*b^5*d*(a + b*Tan[c + d*x])^2) + (4*a*(a^2 + b^2))/(b^5*d*(a + b*Tan[c + d*x]))

Rule 3506

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(b*f), Subst
[Int[(a + x)^n*(1 + x^2/b^2)^(m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && NeQ[a^2 + b
^2, 0] && IntegerQ[m/2]

Rule 697

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(a + c*
x^2)^p, x], x] /; FreeQ[{a, c, d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[p, 0]

Rubi steps

\begin{align*} \int \frac{\sec ^6(c+d x)}{(a+b \tan (c+d x))^3} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\left (1+\frac{x^2}{b^2}\right )^2}{(a+x)^3} \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac{\operatorname{Subst}\left (\int \left (-\frac{3 a}{b^4}+\frac{x}{b^4}+\frac{\left (a^2+b^2\right )^2}{b^4 (a+x)^3}-\frac{4 a \left (a^2+b^2\right )}{b^4 (a+x)^2}+\frac{2 \left (3 a^2+b^2\right )}{b^4 (a+x)}\right ) \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac{2 \left (3 a^2+b^2\right ) \log (a+b \tan (c+d x))}{b^5 d}-\frac{3 a \tan (c+d x)}{b^4 d}+\frac{\tan ^2(c+d x)}{2 b^3 d}-\frac{\left (a^2+b^2\right )^2}{2 b^5 d (a+b \tan (c+d x))^2}+\frac{4 a \left (a^2+b^2\right )}{b^5 d (a+b \tan (c+d x))}\\ \end{align*}

Mathematica [A]  time = 3.10909, size = 140, normalized size = 1.16 \[ \frac{-2 a \left (-\frac{a^2+b^2}{a+b \tan (c+d x)}-2 a \log (a+b \tan (c+d x))+b \tan (c+d x)\right )+2 \left (a^2+b^2\right ) \left (\frac{3 a^2+4 a b \tan (c+d x)-b^2}{2 (a+b \tan (c+d x))^2}+\log (a+b \tan (c+d x))\right )+\frac{b^4 \sec ^4(c+d x)}{2 (a+b \tan (c+d x))^2}}{b^5 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^6/(a + b*Tan[c + d*x])^3,x]

[Out]

((b^4*Sec[c + d*x]^4)/(2*(a + b*Tan[c + d*x])^2) - 2*a*(-2*a*Log[a + b*Tan[c + d*x]] + b*Tan[c + d*x] - (a^2 +
 b^2)/(a + b*Tan[c + d*x])) + 2*(a^2 + b^2)*(Log[a + b*Tan[c + d*x]] + (3*a^2 - b^2 + 4*a*b*Tan[c + d*x])/(2*(
a + b*Tan[c + d*x])^2)))/(b^5*d)

________________________________________________________________________________________

Maple [A]  time = 0.124, size = 184, normalized size = 1.5 \begin{align*}{\frac{ \left ( \tan \left ( dx+c \right ) \right ) ^{2}}{2\,{b}^{3}d}}-3\,{\frac{a\tan \left ( dx+c \right ) }{{b}^{4}d}}-{\frac{{a}^{4}}{2\,d{b}^{5} \left ( a+b\tan \left ( dx+c \right ) \right ) ^{2}}}-{\frac{{a}^{2}}{{b}^{3}d \left ( a+b\tan \left ( dx+c \right ) \right ) ^{2}}}-{\frac{1}{2\,bd \left ( a+b\tan \left ( dx+c \right ) \right ) ^{2}}}+6\,{\frac{\ln \left ( a+b\tan \left ( dx+c \right ) \right ){a}^{2}}{d{b}^{5}}}+2\,{\frac{\ln \left ( a+b\tan \left ( dx+c \right ) \right ) }{{b}^{3}d}}+4\,{\frac{{a}^{3}}{d{b}^{5} \left ( a+b\tan \left ( dx+c \right ) \right ) }}+4\,{\frac{a}{{b}^{3}d \left ( a+b\tan \left ( dx+c \right ) \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^6/(a+b*tan(d*x+c))^3,x)

[Out]

1/2*tan(d*x+c)^2/b^3/d-3*a*tan(d*x+c)/b^4/d-1/2/d/b^5/(a+b*tan(d*x+c))^2*a^4-1/d/b^3/(a+b*tan(d*x+c))^2*a^2-1/
2/b/d/(a+b*tan(d*x+c))^2+6/d/b^5*ln(a+b*tan(d*x+c))*a^2+2*ln(a+b*tan(d*x+c))/b^3/d+4/d*a^3/b^5/(a+b*tan(d*x+c)
)+4*a/b^3/d/(a+b*tan(d*x+c))

________________________________________________________________________________________

Maxima [A]  time = 1.1771, size = 173, normalized size = 1.43 \begin{align*} \frac{\frac{7 \, a^{4} + 6 \, a^{2} b^{2} - b^{4} + 8 \,{\left (a^{3} b + a b^{3}\right )} \tan \left (d x + c\right )}{b^{7} \tan \left (d x + c\right )^{2} + 2 \, a b^{6} \tan \left (d x + c\right ) + a^{2} b^{5}} + \frac{b \tan \left (d x + c\right )^{2} - 6 \, a \tan \left (d x + c\right )}{b^{4}} + \frac{4 \,{\left (3 \, a^{2} + b^{2}\right )} \log \left (b \tan \left (d x + c\right ) + a\right )}{b^{5}}}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^6/(a+b*tan(d*x+c))^3,x, algorithm="maxima")

[Out]

1/2*((7*a^4 + 6*a^2*b^2 - b^4 + 8*(a^3*b + a*b^3)*tan(d*x + c))/(b^7*tan(d*x + c)^2 + 2*a*b^6*tan(d*x + c) + a
^2*b^5) + (b*tan(d*x + c)^2 - 6*a*tan(d*x + c))/b^4 + 4*(3*a^2 + b^2)*log(b*tan(d*x + c) + a)/b^5)/d

________________________________________________________________________________________

Fricas [B]  time = 2.13414, size = 814, normalized size = 6.73 \begin{align*} \frac{24 \, a^{2} b^{2} \cos \left (d x + c\right )^{4} + b^{4} - 2 \,{\left (9 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{2} + 2 \,{\left ({\left (3 \, a^{4} - 2 \, a^{2} b^{2} - b^{4}\right )} \cos \left (d x + c\right )^{4} + 2 \,{\left (3 \, a^{3} b + a b^{3}\right )} \cos \left (d x + c\right )^{3} \sin \left (d x + c\right ) +{\left (3 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) +{\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) - 2 \,{\left ({\left (3 \, a^{4} - 2 \, a^{2} b^{2} - b^{4}\right )} \cos \left (d x + c\right )^{4} + 2 \,{\left (3 \, a^{3} b + a b^{3}\right )} \cos \left (d x + c\right )^{3} \sin \left (d x + c\right ) +{\left (3 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\cos \left (d x + c\right )^{2}\right ) - 4 \,{\left (a b^{3} \cos \left (d x + c\right ) + 3 \,{\left (a^{3} b - a b^{3}\right )} \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )}{2 \,{\left (2 \, a b^{6} d \cos \left (d x + c\right )^{3} \sin \left (d x + c\right ) + b^{7} d \cos \left (d x + c\right )^{2} +{\left (a^{2} b^{5} - b^{7}\right )} d \cos \left (d x + c\right )^{4}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^6/(a+b*tan(d*x+c))^3,x, algorithm="fricas")

[Out]

1/2*(24*a^2*b^2*cos(d*x + c)^4 + b^4 - 2*(9*a^2*b^2 + b^4)*cos(d*x + c)^2 + 2*((3*a^4 - 2*a^2*b^2 - b^4)*cos(d
*x + c)^4 + 2*(3*a^3*b + a*b^3)*cos(d*x + c)^3*sin(d*x + c) + (3*a^2*b^2 + b^4)*cos(d*x + c)^2)*log(2*a*b*cos(
d*x + c)*sin(d*x + c) + (a^2 - b^2)*cos(d*x + c)^2 + b^2) - 2*((3*a^4 - 2*a^2*b^2 - b^4)*cos(d*x + c)^4 + 2*(3
*a^3*b + a*b^3)*cos(d*x + c)^3*sin(d*x + c) + (3*a^2*b^2 + b^4)*cos(d*x + c)^2)*log(cos(d*x + c)^2) - 4*(a*b^3
*cos(d*x + c) + 3*(a^3*b - a*b^3)*cos(d*x + c)^3)*sin(d*x + c))/(2*a*b^6*d*cos(d*x + c)^3*sin(d*x + c) + b^7*d
*cos(d*x + c)^2 + (a^2*b^5 - b^7)*d*cos(d*x + c)^4)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**6/(a+b*tan(d*x+c))**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.45648, size = 189, normalized size = 1.56 \begin{align*} \frac{\frac{4 \,{\left (3 \, a^{2} + b^{2}\right )} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{b^{5}} + \frac{b^{3} \tan \left (d x + c\right )^{2} - 6 \, a b^{2} \tan \left (d x + c\right )}{b^{6}} - \frac{18 \, a^{2} b^{2} \tan \left (d x + c\right )^{2} + 6 \, b^{4} \tan \left (d x + c\right )^{2} + 28 \, a^{3} b \tan \left (d x + c\right ) + 4 \, a b^{3} \tan \left (d x + c\right ) + 11 \, a^{4} + b^{4}}{{\left (b \tan \left (d x + c\right ) + a\right )}^{2} b^{5}}}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^6/(a+b*tan(d*x+c))^3,x, algorithm="giac")

[Out]

1/2*(4*(3*a^2 + b^2)*log(abs(b*tan(d*x + c) + a))/b^5 + (b^3*tan(d*x + c)^2 - 6*a*b^2*tan(d*x + c))/b^6 - (18*
a^2*b^2*tan(d*x + c)^2 + 6*b^4*tan(d*x + c)^2 + 28*a^3*b*tan(d*x + c) + 4*a*b^3*tan(d*x + c) + 11*a^4 + b^4)/(
(b*tan(d*x + c) + a)^2*b^5))/d